import 'package:flutter/cupertino.dart';
import 'package:study_flutter/yzhg/view/ImageDemo.dart';
import 'package:study_flutter/yzhg/view/container/ContainerDemo.dart';
import 'package:study_flutter/yzhg/view/container/DecoratedBoxDemo.dart';
import 'package:study_flutter/yzhg/view/layout/RowAndColumn.dart';
import 'package:study_flutter/yzhg/view/layout/align/AlignDemo.dart';
import 'package:study_flutter/yzhg/view/layout/flex/FlexDemo.dart';
import 'package:study_flutter/yzhg/view/layout/flow/FlowDemo.dart';
import 'package:study_flutter/yzhg/view/layout/rawcolumn/ColumnDemo.dart';
import 'package:study_flutter/yzhg/view/layout/rawcolumn/RawDemo.dart';
import 'package:study_flutter/yzhg/view/layout/stack/StackDemo.dart';
import 'package:study_flutter/yzhg/view/list_module/ListViewBuilderDemo.dart';
import 'package:study_flutter/yzhg/view/list_module/ScrollableDemo.dart';
import 'package:study_flutter/yzhg/view/list_module/SingleChildScrollViewTestRoute.dart';
import 'package:study_flutter/yzhg/view/list_module/defaultList.dart';
import 'package:study_flutter/yzhg/view/package/PackageManage.dart';
import 'package:study_flutter/yzhg/view/resource/ResourceManager.dart';
import 'package:study_flutter/yzhg/view/route_by_value/RouteByValue.dart';
import 'package:study_flutter/yzhg/view/scaffold_tabbar/TabBottomBar.dart';
import 'package:study_flutter/yzhg/view/weight/CounterWidget.dart';
import 'package:study_flutter/yzhg/view/weight/SnackBarShow.dart';
import 'package:study_flutter/yzhg/view/weight/WidgetStudy.dart';
import 'YzhgHomePage.dart';
import 'module/MConstant.dart';
import 'view/InputAndForm.dart';
import 'view/ProgressDemo.dart';
import 'view/SwitchAndCheckBoxTestRoute.dart';
import 'view/TextDemo.dart';
import 'view/buttonDemo.dart';

class YConstant {
  static Map<String, WidgetBuilder> getYzhgRoutes(BuildContext context) {
    var routesMap = new Map<String, WidgetBuilder>();
    routesMap[YZHG_HOME_PAGE] = (context) => YzhgHomeRoute();
    routesMap[TIP_ROUTE_PAGE] = (context) => TipRoute();
    routesMap[PACKAGE_MANAGE_PAGE] = (context) => PackageManage();
    routesMap[PACKAGE_RESOURCE_MANAGER] = (context) => ResourceManager();
    routesMap[PACKAGE_WIDGET_STUDY] = (context) => WidgetStudy();
    routesMap[WEIGHT_STATE] = (context) => CounterWidget();
    routesMap[WIDGET_SNACKBAR] = (context) => SnackBarShow();
    routesMap[VIEW_TEXT_STUDY] = (context) => TextDemo();
    routesMap[VIEW_BUTTON_STUDY] = (context) => buttonDemo();
    routesMap[VIEW_IMAGE_STUDY] = (context) => ImageDemo();
    routesMap[VIEW_SWITCH_CHECKBOX] = (context) => SwitchAndCheckBoxTestRoute();
    routesMap[VIEW_INPUT_FORM] = (context) => InputAndForm();
    routesMap[VIEW_PROGRESS_DEMO] = (context) => ProgressDemo();
    routesMap[VIEW_ROW_COLUMN] = (context) => RowAndColumn();
    routesMap[VIEW_RAW_DEMO] = (context) => RawDemo();
    routesMap[VIEW_COLUMN_DEMO] = (context) => ColumnDemo();
    routesMap[VIEW_FLEX_DEMO] = (context) => FlexDemo();
    routesMap[VIEW_FLOW_DEMO] = (context) => FlowDemo();
    routesMap[VIEW_STACK_DEMO] = (context) => StackDemo();
    routesMap[VIEW_ALIGN_DEMO] = (context) => AlignDemo();
    routesMap[CONTAINER_DEMO] = (context) => ContainerDemo();
    routesMap[DECORATED_BOX] = (context) => DecoratedBoxDemo();
    routesMap[TAB_BOTTOM_BAR] = (context) => TabBottomBar();
    routesMap[SCROLLABLE_DEMO] = (context) => ScrollableDemo();
    routesMap[SINGLE_CHILD_SCROLL] =
        (context) => SingleChildScrollViewTestRoute();
    routesMap[DEFAULT_LIST] = (context) => defaultList();
    routesMap[LISTVIEW_BUILDER_DEMO] = (context) => ListViewBuilderDemo();
    //添加功能组件
    routesMap.addAll(MConstant.getFunctionRoutes(context));
    //  routesMap.addAll(MConstant.getHttpRoutes(context));
    return routesMap;
  }

  /*设置路由跳转常量*/
  static String YZHG_HOME_PAGE = "yzhg_page";
  static String TIP_ROUTE_PAGE = "tip_route_page";
  static String PACKAGE_MANAGE_PAGE = "package_manage";
  static String PACKAGE_RESOURCE_MANAGER = "resource_manager";
  static String VIEW_TEXT_STUDY = "view_text";
  static String PACKAGE_WIDGET_STUDY = "widget_study";
  static String WEIGHT_STATE = "weight_state";
  static String WIDGET_SNACKBAR = "widget_snackbar";
  static String VIEW_BUTTON_STUDY = "view_button_study";
  static String VIEW_IMAGE_STUDY = "view_image_study";
  static String VIEW_SWITCH_CHECKBOX = "view_switch_checkbox";
  static String VIEW_INPUT_FORM = "view_input_form";
  static String VIEW_PROGRESS_DEMO = "view_progress_demo";
  static String VIEW_ROW_COLUMN = "view_row_column";
  static String VIEW_RAW_DEMO = "view_raw_demo";
  static String VIEW_COLUMN_DEMO = "view_column_demo";
  static String VIEW_FLEX_DEMO = "view_flex_demo";
  static String VIEW_FLOW_DEMO = "view_flow_demo";
  static String VIEW_STACK_DEMO = "view_stack_demo";
  static String VIEW_ALIGN_DEMO = "view_align_demo";
  static String CONTAINER_DEMO = "container_demo";
  static String DECORATED_BOX = "decorated_box";
  static String TAB_BOTTOM_BAR = "tab_bottom_bar";
  static String SCROLLABLE_DEMO = "scrollable_demo";
  static String SINGLE_CHILD_SCROLL = "single_childscrollview_testroute";
  static String DEFAULT_LIST = "default_list";
  static String LISTVIEW_BUILDER_DEMO = "listview_builder_demo";
}
